#!/bin/bash

if [ $# -eq 0 ]; then
	echo "Usage : makeschema.sh DOMAIN_NAME"
	exit 65
fi

xmllint --noout --debug --xinclude --relaxng $SQLZEN/schema/declare.rng $1-declare.xml
xsltproc --xinclude --param language 'ko' --param sqlzen \'$SQLZEN\' --param domain \'$1\' $SQLZEN/stylesheet/schema.xsl $1-declare.xml > $1-define.rng
xmllint --noout --relaxng $SQLZEN/external/schema/relaxng.rng $1-define.rng

